﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SettingManager : BaseManager<SettingManager> {

	#region 封装好的属性

	/// <summary>
	/// 背景音乐音量
	/// </summary>
	/// <value>0~1.0</value>
	public float BackVolume{
		set{
			PlayerPrefs.SetFloat("BackVolume",value);
            EventManager.Instance.PostNotification(EVENT_TYPE.SETTING
                , this);
		}
		get{
			return PlayerPrefs.GetFloat("BackVolume",1f);
		}
	}

	/// <summary>
	/// 音效音量
	/// </summary>
	/// <value>0~1.0</value>
	public float MainVolume{
		set{
			PlayerPrefs.SetFloat("MainVolume",value);
            EventManager.Instance.PostNotification(EVENT_TYPE.SETTING
                , this);
        }
		get{
			return PlayerPrefs.GetFloat("MainVolume",1f);
		}
	}

    protected override void OnMyEvent(EVENT_TYPE Event_Type, Component Sender, object Param = null)
    {

    }

    #endregion
    
    

}
